package com.dingwen.treasure.kettle.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import com.dingwen.treasure.kettle.base.enums.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 　DbEnum
 * 　@author dingwen
 * 　@date 2022/8/20
 */
@Getter
@AllArgsConstructor
public enum DbEnum implements BaseEnum<String> {

    /**
     * mysql8
     */
    MYSQL8("MYSQL8", "MYSQL"),

    /**
     * postgres
     */
    POSTGRES("PostgreSQL", "PostgreSQL");

    /**
     * code
     */
    @EnumValue
    private final String code;

    /**
     * 描述
     */
    @JsonValue
    private final String description;

    /**
     * 获取枚举类描述
     *
     * @return {@link String}
     */
    @Override
    public String getEnumDescription() {
        return "数据库类型";
    }
    }
